import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-2*np.pi,2*np.pi)
y1 = np.sin(x)
y2 = np.cos(x)
plt.figure(figsize=(9,6))
plt.plot(x,y1,linestyle="-")
plt.plot(x,y2,linestyle="--")
plt.xlim(x[0],x[-1])
plt.ylim(-1,1)
plt.title('sin(x)ANDcos(x)')
plt.legend(['y=sin(x)','y=cos(x)'])
plt.xlabel('x')
plt.ylabel('y')
plt.show()